/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

/* Part Element */
.monaco-workbench .part.titlebar {
	display: flex;
	flex-direction: row;
}

.monaco-workbench.mac .part.titlebar {
	flex-direction: row-reverse;
}

/* Root Container */
.monaco-workbench .part.titlebar>.titlebar-container {
	box-sizing: border-box;
	overflow: hidden;
	flex-shrink: 1;
	flex-grow: 1;
	align-items: center;
	justify-content: center;
	user-select: none;
	-webkit-user-select: none;
	display: flex;
	height: 100%;
	width: 100%;
}

/* Account for zooming */
.monaco-workbench .part.titlebar>.titlebar-container.counter-zoom {
	zoom: calc(1.0 / var(--zoom-factor));
}

/* Platform specific root element */
.monaco-workbench.mac .part.titlebar>.titlebar-container {
	line-height: 22px;
}

.monaco-workbench.web .part.titlebar>.titlebar-container,
.monaco-workbench.windows .part.titlebar>.titlebar-container,
.monaco-workbench.linux .part.titlebar>.titlebar-container {
	height: 30px;
	line-height: 22px;
	justify-content: left;
}

.monaco-workbench.web.safari .part.titlebar,
.monaco-workbench.web.safari .part.titlebar>.titlebar-container {
	/* Must be scoped to safari due to #148851 */
	/* Is required in safari due to #149476 */
	overflow: visible;
}

/* Draggable region */
.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-drag-region {
	top: 0;
	left: 0;
	display: block;
	position: absolute;
	width: 100%;
	height: 100%;
	-webkit-app-region: drag;
}

/* Window title text */
.monaco-workbench .part.titlebar>.titlebar-container>.window-title {
	flex: 0 1 auto;
	font-size: 12px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	margin-left: auto;
	margin-right: auto;
}

.monaco-workbench.web .part.titlebar>.titlebar-container>.window-title,
.monaco-workbench.windows .part.titlebar>.titlebar-container>.window-title,
.monaco-workbench.linux .part.titlebar>.titlebar-container>.window-title {
	cursor: default;
}

.monaco-workbench.linux .part.titlebar>.titlebar-container>.window-title {
	font-size: inherit;
	/* see #55435 */
}

/* Window Title Menu */
.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center {
	z-index: 2550;
	-webkit-app-region: no-drag;
	padding: 0 8px;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center.hide {
	display: none;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.quickopen {
	display: flex;
	color: var(--vscode-commandCenter-foreground);
	background-color: var(--vscode-commandCenter-background);
	border: 1px solid var(--vscode-commandCenter-border);
	border-radius: 5px;
	height: 20px;
	line-height: 18px;
	width: 38vw;
	max-width: 600px;
	margin: 4px 4px;
	flex-direction: row;
	justify-content: center;
	overflow: hidden;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.quickopen:HOVER {
	color: var(--vscode-commandCenter-activeForeground);
	background-color: var(--vscode-commandCenter-activeBackground);
	line-height: 18px;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center:HOVER .quickopen .action-label {
	background-color: transparent !important;
	outline-color: transparent !important;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.quickopen>.action-label.search {
	display: inline-flex;
	text-align: center;
	font-size: 12px;
	line-height: 14px;
	background-color: inherit;
	justify-content: center;
	width: calc(100% - 19px);
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.quickopen>.action-label.search>.search-icon {
	font-size: 14px;
	opacity: .8;
	padding: 0 3px;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.quickopen>.action-label.search>.search-label {
	overflow: hidden;
	text-overflow: ellipsis;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center .action-item.quickopen>.all-options>.action-label {
	text-align: center;
	font-size: 12px;
	width: 16px;
	border-left: 1px solid transparent;
	border-radius: 0;
	padding-right: 0;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-title>.command-center:HOVER .action-item.quickopen>.all-options>.action-label {
	border-color: var(--vscode-commandCenter-border);
}

/* Menubar */
.monaco-workbench .part.titlebar>.titlebar-container>.menubar {
	/* move menubar above drag region as negative z-index on drag region cause greyscale AA */
	z-index: 2500;
	min-width: 36px;
}

/* Resizer */
.monaco-workbench.windows .part.titlebar>.titlebar-container>.resizer,
.monaco-workbench.linux .part.titlebar>.titlebar-container>.resizer {
	-webkit-app-region: no-drag;
	position: absolute;
	top: 0;
	width: 100%;
	height: 4px;
}

.monaco-workbench.windows.fullscreen .part.titlebar>.titlebar-container>.resizer,
.monaco-workbench.linux.fullscreen .part.titlebar>.titlebar-container>.resizer {
	display: none;
}

/* App Icon */
.monaco-workbench .part.titlebar>.titlebar-container>.window-appicon {
	width: 35px;
	height: 100%;
	position: relative;
	z-index: 3000;
	flex-shrink: 0;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-appicon:not(.codicon) {
	background-image: url('../../../media/code-icon.svg');
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 16px;
}

.monaco-workbench .part.titlebar>.titlebar-container>.window-appicon.codicon {
	line-height: 30px;
}

.monaco-workbench.fullscreen .part.titlebar>.titlebar-container>.window-appicon {
	display: none;
}

.monaco-workbench .part.titlebar>.titlebar-container .window-appicon>.home-bar-icon-badge {
	position: absolute;
	right: 9px;
	bottom: 6px;
	width: 8px;
	height: 8px;
	z-index: 1;
	/* on top of home indicator */
	background-image: url('../../../media/code-icon.svg');
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 8px;
	pointer-events: none;
	border-top: 1px solid transparent;
	border-left: 1px solid transparent;
}

/* Window Controls (Minimize, Max/Restore, Close) */
.monaco-workbench .part.titlebar>.window-controls-container {
	display: flex;
	flex-grow: 0;
	flex-shrink: 0;
	text-align: center;
	z-index: 3000;
	-webkit-app-region: no-drag;
	height: 30px;
	width: 138px;
	zoom: calc(1 / var(--zoom-factor));
}

.monaco-workbench.mac .part.titlebar>.window-controls-container {
	width: 70px;
	height: env(titlebar-area-width, 28px);
}

.monaco-workbench.web .part.titlebar>.window-controls-container,
.monaco-workbench.fullscreen .part.titlebar>.window-controls-container {
	display: none;
	background-color: transparent;
}

/* Window Control Icons */
.monaco-workbench .part.titlebar>.window-controls-container>.window-icon {
	display: inline-block;
	line-height: 30px;
	height: 100%;
	width: 46px;
	font-size: 16px;
}

.monaco-workbench .part.titlebar>.window-controls-container>.window-icon:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.monaco-workbench .part.titlebar.light>.window-controls-container>.window-icon:hover {
	background-color: rgba(0, 0, 0, 0.1);
}

.monaco-workbench .part.titlebar>.window-controls-container>.window-icon.window-close:hover {
	background-color: rgba(232, 17, 35, 0.9);
}

.monaco-workbench .part.titlebar>.window-controls-container .window-icon.window-close:hover {
	color: white;
}

/* Layout Controls */
.monaco-workbench .part.titlebar>.titlebar-container>.layout-controls-container {
	display: none;
	padding-right: 2px;
	flex-grow: 0;
	flex-shrink: 0;
	text-align: center;
	position: relative;
	z-index: 3000;
	-webkit-app-region: no-drag;
	height: 100%;
	margin-left: auto;
	min-width: 28px;
}

.monaco-workbench.mac:not(.web) .part.titlebar>.layout-controls-container {
	position: absolute;
	right: 8px;
}

.monaco-workbench .part.titlebar>.titlebar-container>.layout-controls-container.show-layout-control {
	display: flex;
	justify-content: center;
}

.monaco-workbench .part.titlebar>.titlebar-container>.layout-controls-container .codicon {
	color: inherit;
}
